<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>商城</title>
<link rel="stylesheet" type="text/css" href="js/easyui/themes/default/easyui.css">
<link rel="stylesheet" type="text/css" href="js/easyui/themes/icon.css">
<script type="text/javascript" src="js/jquery-1.7.2.min.js"></script>
<script type="text/javascript" src="js/easyui/jquery.easyui.min.js"></script>
<script>
$(function(){
	var title="${title}";
	var url ="${url}"
	if(title!=""&&url!=""){
		add_tab(url,title);
	}
	
});
function add_tab(url,title){
	console.log($('#tt').tabs('getSelected'));
	var exist = $("#tt").tabs('exists',title);
	if(exist){
		$("#tt").tabs('select',title);
		return;
	}
	$.post(url,function(data){
		$('#tt').tabs('add',{    
		    title:title,    
		    content:data,    
		    closable:true,    
		    tools:[{    
		        iconCls:'icon-mini-refresh',    
		        handler:function(){    
		            alert('refresh');    
		        }    
		    }]    
		});
	});
}
</script>
</head>
<body class="easyui-layout">

	<div data-options="region:'north',border:false" style="height:60px;background:#B3DFDA;padding:10px">north region</div>
	<div data-options="region:'west',split:true,title:'West'" style="width:200px;padding:10px;">

	<!-- <div class="easyui-accordion" style="width:170px">
		<div title="About" data-options="iconCls:'icon-ok'" style="overflow:auto;padding:10px;">
			<ul>
				<li><a target="_blank" href="javascript:add_tab('goto_spu.do','商品信息管理') ">商品信息管理</a><br></li>
				<li><a target="_blank" href="goto_attr.do">商品属性管理</a><br></li>
				<li><a target="_blank" href="goto_sku.do">商品库存单元管理</a><br></li>
				<li>商品缓存管理</li>
			</ul>
		</div>
	</div> -->
	<ul class="easyui-tree">
		<li>
			<span>商品管理</span>
			<ul>
				<li>
					<span><a href="javascript:add_tab('goto_spu.do','商品信息管理') ">商品信息管理</a></span>
				</li>
				<li>
					<span><a href="javascript:add_tab('goto_attr.do','商品属性管理') ">商品属性管理</a></span>
				</li>
				<li>
					<span><a href="javascript:add_tab('goto_sku.do','商品库存单元管理') ">商品库存单元管理</a></span>
				</li>
				<li><span>商品缓存管理</span></li>
			</ul>
		</li>
		<li>
			<span>商品缓存管理</span>
			<ul>
				<li>
					<span>商品缓存管理</span>
				</li>
			</ul>
		</li>
	</ul>
	
	</div>
	<div data-options="region:'east',split:true,collapsed:true,title:'East'" style="width:100px;padding:10px;">east region</div>
	<div data-options="region:'south',border:false" style="height:50px;background:#A9FACD;padding:10px;">south region</div>
	<div data-options="region:'center',title:'Center'">
		<div class="easyui-tabs"  style="height:500px" id="tt">
			
		</div>
	</div>
	<!-- 后台管理首页
	<hr>
	-->
	
</body>
</html>